<#import "/spring.ftl" as spring />
	<table class="standard">
	<tr>
		<th></th>
		<th>FEE</th>
		<th>ZIP</th>
		<th>LISTING</th>
		<th>SQFT</th>
		<th>BEDS</th>
		<th>BATHS</th>
		<th>TYPE</th>
		<th>FOUND</th>
	</tr>
	
	<#if calculators?size != 0>
		<#list calculators as calculator>
			<tr>
				<td class="rowHeader">
					<#if ruleEditAllowed??>
					<a href="editBaseFeeWithAdjustersCalculatorForm.html?id=${calculator.id}&type=${calculator.class.name}">
					</#if>
						RULE #${calculator.sequentialId}
					<#if ruleEditAllowed??>
					</a>
					</#if>
				</td>
				<td>$${calculator.baseFee?string("###,##0")}</td>
				<!-- zip -->
				<#if calculator.supportedZipCodes??>
					<#if calculator.supportedZipCodes == "">
						<td>ANY</td>
					<#else>
						<td>${calculator.supportedZipCodes!}</td>
					</#if>
				<#else>
					<td>ANY</td>
				</#if>
				<!-- price -->
				<#assign minListedPriceInThousands = (calculator.minListedPrice / 1000) />
				<#assign maxListedPriceInThousands = (calculator.maxListedPrice / 1000) />
				<#if calculator.minListedPrice == 0 && calculator.maxListedPrice == 0>
					<td>ANY</td>
				<#elseif calculator.maxListedPrice == 0>
					<td>$${minListedPriceInThousands?string("###,###,##0")!}+</td>
				<#else>
					<td>$${minListedPriceInThousands?string("###,###,##0")!}-$${maxListedPriceInThousands?string("###,###,##0")!}</td>
				</#if>
				<!-- sq ft -->
				<#if calculator.minSquareFeet == 0 && calculator.maxSquareFeet == 0>
					<td>ANY</td>
				<#elseif calculator.maxSquareFeet == 0>
					<td>${calculator.minSquareFeet!}+</td>
				<#else>
					<td>${calculator.minSquareFeet!}-${calculator.maxSquareFeet!}</td>
				</#if>
				<!-- beds -->
				<#if calculator.minNumberOfBedrooms == 0 && calculator.maxNumberOfBedrooms == 0>
					<td>ANY</td>
				<#elseif calculator.maxNumberOfBedrooms == 0>
					<td>${calculator.minNumberOfBedrooms!}+</td>
				<#else>
					<td>${calculator.minNumberOfBedrooms!}-${calculator.maxNumberOfBedrooms!}</td>
				</#if>				
				<!-- baths -->
				<#if calculator.minNumberOfBathrooms == 0 && calculator.maxNumberOfBathrooms == 0>
					<td>ANY</td>
				<#elseif calculator.maxNumberOfBathrooms == 0>
					<td>${calculator.minNumberOfBathrooms!}+</td>
				<#else>
					<td>${calculator.minNumberOfBathrooms!}-${calculator.maxNumberOfBathrooms!}</td>
				</#if>
				<!-- dwelling -->
				<#if calculator.propertyType == "Unspecified">
					<td>ANY</td>
				<#else>
					<td>${calculator.propertyType}</td>
				</#if>				
				<!-- foundation -->
				<#if calculator.foundationType == "Unspecified">
					<td>ANY</td>
				<#else>
					<td>${calculator.foundationType}</td>
				</#if>				
			</tr>
		</#list>
	<#else>
		<tr>
			<td colspan="7"><i>You have not defined any inspection fee calculators yet.</i></td>
		</tr>
	</#if>
	 </table>
